package com.erdos.upc.service;

import java.util.List;

import com.erdos.upc.entity.BusinessPrivilege;
import com.erdos.upc.entity.ControlMode;


public interface BusinessPrivilegeService {

	/**
	 * 通过用户ID获取数据权限
	 * @param userId
	 * @author jl
	 * @since  2008-8-11 
	 */
	public List<BusinessPrivilege> findBusinessPrivilegeByUser(Long userId); 
	
	/**
	 * 通过用户ID，工厂ID和分类 获取符合条件的数据权限
	 * @param userId
	 * @param facilityId
	 * @param category
	 * @author jl
	 * @since  2008-8-11 
	 */
	public List<BusinessPrivilege> findBusinessPrivilegeByUserAndCategory(Long userId,String facilityId,String category);

	/**
	 * 通过用户ID，工厂ID和分类及受控业务对象的ID 获取用户对该业务对象的操作权限
	 * @param userId
	 * @param facilityId
	 * @param category
	 * @param businessId
	 * @author jl
	 * @since  2008-8-11 
	 */
	public ControlMode checkUserPrivilege(Long userId, String facilityId,String category,String businessId);
    
	/**
	 * 通过用户ID，工厂ID和分类 获取符合条件的数据权限的ID
	 * @param userId
	 * @param facilityId
	 * @param category
	 * @author jl
	 * @since  2008-8-11 
	 */
	public List<String> findIDByUserAndCategory(Long userId,String facilityId,String category);
	
}
